﻿<Router AppAssembly="@typeof(Program).Assembly">
    <Found Context="routeData">
        <AuthorizeRouteView Resource="@routeData" RouteData="@routeData" DefaultLayout="@typeof(Layout.MainLayout)">
            <Authorizing>
                <MudLayout Class="d-flex align-content-center flex-wrap flex-grow-1">
                    <MudMainContent>
                        <MudContainer Style="padding:0px;width:50px;">
                            <MudProgressCircular Color="Color.Primary" Size="Size.Small" Indeterminate="true" />
                        </MudContainer>
                    </MudMainContent>
                </MudLayout>
            </Authorizing>
            <NotAuthorized>
                <RedirectToLogin></RedirectToLogin>
            </NotAuthorized>
        </AuthorizeRouteView>
    </Found>
    <NotFound>
        <PageTitle>Error 404</PageTitle>
        <LayoutView Layout="@typeof(Layout.MainLayout)">
            <MudAlert Severity="Severity.Error" Variant="Variant.Outlined" Class="my-2">Not Found.</MudAlert>
        </LayoutView>
    </NotFound>
</Router>
